(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

minus(x, 0) → x
minus(s(x), s(y)) → minus(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
quot(x, s(y)) → if_quot(le(s(y), x), x, s(y))
if_quot(true, x, y) → s(quot(minus(x, y), y))
if_quot(false, x, y) → 0

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
quot(z0, s(z1)) → if_quot(le(s(z1), z0), z0, s(z1))
if_quot(true, z0, z1) → s(quot(minus(z0, z1), z1))
if_quot(false, z0, z1) → 0
Tuples:

MINUS(z0, 0) → c
MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(0, z0) → c2
LE(s(z0), 0) → c3
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(z0, s(z1)) → c5(IF_QUOT(le(s(z1), z0), z0, s(z1)), LE(s(z1), z0))
IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1))
IF_QUOT(false, z0, z1) → c7
S tuples:

MINUS(z0, 0) → c
MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(0, z0) → c2
LE(s(z0), 0) → c3
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(z0, s(z1)) → c5(IF_QUOT(le(s(z1), z0), z0, s(z1)), LE(s(z1), z0))
IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1))
IF_QUOT(false, z0, z1) → c7
K tuples:none
Defined Rule Symbols:

minus, le, quot, if_quot

Defined Pair Symbols:

MINUS, LE, QUOT, IF_QUOT

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing nodes:

IF_QUOT(false, z0, z1) → c7
LE(s(z0), 0) → c3
MINUS(z0, 0) → c
LE(0, z0) → c2

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
quot(z0, s(z1)) → if_quot(le(s(z1), z0), z0, s(z1))
if_quot(true, z0, z1) → s(quot(minus(z0, z1), z1))
if_quot(false, z0, z1) → 0
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(z0, s(z1)) → c5(IF_QUOT(le(s(z1), z0), z0, s(z1)), LE(s(z1), z0))
IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1))
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(z0, s(z1)) → c5(IF_QUOT(le(s(z1), z0), z0, s(z1)), LE(s(z1), z0))
IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1))
K tuples:none
Defined Rule Symbols:

minus, le, quot, if_quot

Defined Pair Symbols:

MINUS, LE, QUOT, IF_QUOT

Compound Symbols:

c1, c4, c5, c6

(5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

quot(z0, s(z1)) → if_quot(le(s(z1), z0), z0, s(z1))
if_quot(true, z0, z1) → s(quot(minus(z0, z1), z1))
if_quot(false, z0, z1) → 0

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(z0, s(z1)) → c5(IF_QUOT(le(s(z1), z0), z0, s(z1)), LE(s(z1), z0))
IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1))
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(z0, s(z1)) → c5(IF_QUOT(le(s(z1), z0), z0, s(z1)), LE(s(z1), z0))
IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1))
K tuples:none
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

MINUS, LE, QUOT, IF_QUOT

Compound Symbols:

c1, c4, c5, c6

(7) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace QUOT(z0, s(z1)) → c5(IF_QUOT(le(s(z1), z0), z0, s(z1)), LE(s(z1), z0)) by

QUOT(0, s(z0)) → c5(IF_QUOT(false, 0, s(z0)), LE(s(z0), 0))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1))
QUOT(0, s(z0)) → c5(IF_QUOT(false, 0, s(z0)), LE(s(z0), 0))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1))
QUOT(0, s(z0)) → c5(IF_QUOT(false, 0, s(z0)), LE(s(z0), 0))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
K tuples:none
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

MINUS, LE, IF_QUOT, QUOT

Compound Symbols:

c1, c4, c6, c5

(9) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing nodes:

QUOT(0, s(z0)) → c5(IF_QUOT(false, 0, s(z0)), LE(s(z0), 0))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
K tuples:none
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

MINUS, LE, IF_QUOT, QUOT

Compound Symbols:

c1, c4, c6, c5

(11) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace IF_QUOT(true, z0, z1) → c6(QUOT(minus(z0, z1), z1), MINUS(z0, z1)) by

IF_QUOT(true, z0, 0) → c6(QUOT(z0, 0), MINUS(z0, 0))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, z0, 0) → c6(QUOT(z0, 0), MINUS(z0, 0))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, z0, 0) → c6(QUOT(z0, 0), MINUS(z0, 0))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
K tuples:none
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

MINUS, LE, QUOT, IF_QUOT

Compound Symbols:

c1, c4, c5, c6

(13) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing nodes:

IF_QUOT(true, z0, 0) → c6(QUOT(z0, 0), MINUS(z0, 0))

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
K tuples:none
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

MINUS, LE, QUOT, IF_QUOT

Compound Symbols:

c1, c4, c5, c6

(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
We considered the (Usable) Rules:

le(s(z0), s(z1)) → le(z0, z1)
le(s(z0), 0) → false
le(0, z0) → true
minus(s(z0), s(z1)) → minus(z0, z1)
minus(z0, 0) → z0
And the Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(IF_QUOT(x1, x2, x3)) = x1 + x2   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = 0   
POL(QUOT(x1, x2)) = [1] + x1   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   
POL(c5(x1, x2)) = x1 + x2   
POL(c6(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = [1]   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = [1]   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
K tuples:

IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

MINUS, LE, QUOT, IF_QUOT

Compound Symbols:

c1, c4, c5, c6

(17) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)

The following tuples could be moved from S to K by knowledge propagation:

QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
K tuples:

IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

MINUS, LE, QUOT, IF_QUOT

Compound Symbols:

c1, c4, c5, c6

(19) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
We considered the (Usable) Rules:

minus(s(z0), s(z1)) → minus(z0, z1)
minus(z0, 0) → z0
And the Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(IF_QUOT(x1, x2, x3)) = x2·x3   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = x2   
POL(QUOT(x1, x2)) = x1·x2   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   
POL(c5(x1, x2)) = x1 + x2   
POL(c6(x1, x2)) = x1 + x2   
POL(false) = [2]   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = 0   

(20) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

LE(s(z0), s(z1)) → c4(LE(z0, z1))
K tuples:

IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

MINUS, LE, QUOT, IF_QUOT

Compound Symbols:

c1, c4, c5, c6

(21) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

LE(s(z0), s(z1)) → c4(LE(z0, z1))
We considered the (Usable) Rules:

minus(s(z0), s(z1)) → minus(z0, z1)
minus(z0, 0) → z0
And the Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [2]   
POL(IF_QUOT(x1, x2, x3)) = [2]x22   
POL(LE(x1, x2)) = x2   
POL(MINUS(x1, x2)) = 0   
POL(QUOT(x1, x2)) = x1 + [2]x12   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   
POL(c5(x1, x2)) = x1 + x2   
POL(c6(x1, x2)) = x1 + x2   
POL(false) = [1]   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = 0   

(22) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:none
K tuples:

IF_QUOT(true, s(z0), s(z1)) → c6(QUOT(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
QUOT(s(z1), s(z0)) → c5(IF_QUOT(le(z0, z1), s(z1), s(z0)), LE(s(z0), s(z1)))
MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
LE(s(z0), s(z1)) → c4(LE(z0, z1))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

MINUS, LE, QUOT, IF_QUOT

Compound Symbols:

c1, c4, c5, c6

(23) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(24) BOUNDS(1, 1)